/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package idea.model.qnrlibrary;


import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.Lob;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.xml.bind.annotation.XmlRootElement;


/**
 *
 * @author rejun001
 */
@Entity
@Table( name = "custom_content_layouts" )
@XmlRootElement
@NamedQueries( 
{
    @NamedQuery( name = "CustomContentLayouts.findAll" , query = "SELECT c FROM CustomContentLayouts c" ) ,
    @NamedQuery( name = "CustomContentLayouts.findByFormMedia" , query = "SELECT c FROM CustomContentLayouts c WHERE c.formMedia = :formMedia" ) ,
    @NamedQuery( name = "CustomContentLayouts.findByItemLayout" , query = "SELECT c FROM CustomContentLayouts c WHERE c.itemLayout = :itemLayout" ) ,
    @NamedQuery( name = "CustomContentLayouts.findByDesignerSfo" , query = "SELECT c FROM CustomContentLayouts c WHERE c.designerSfo = :designerSfo" ) ,
    @NamedQuery( name = "CustomContentLayouts.findByEncapsulatedSfo" , query = "SELECT c FROM CustomContentLayouts c WHERE c.encapsulatedSfo = :encapsulatedSfo" ) ,
    @NamedQuery( name = "CustomContentLayouts.findByLayoutInSync" , query = "SELECT c FROM CustomContentLayouts c WHERE c.layoutInSync = :layoutInSync" ) ,
    @NamedQuery( name = "CustomContentLayouts.findByCreatedBy" , query = "SELECT c FROM CustomContentLayouts c WHERE c.createdBy = :createdBy" ) ,
    @NamedQuery( name = "CustomContentLayouts.findByDateCreated" , query = "SELECT c FROM CustomContentLayouts c WHERE c.dateCreated = :dateCreated" ) ,
    @NamedQuery( name = "CustomContentLayouts.findByModifiedBy" , query = "SELECT c FROM CustomContentLayouts c WHERE c.modifiedBy = :modifiedBy" ) ,
    @NamedQuery( name = "CustomContentLayouts.findByDateModified" , query = "SELECT c FROM CustomContentLayouts c WHERE c.dateModified = :dateModified" ) ,
    @NamedQuery( name = "CustomContentLayouts.findByCustomContentLayoutsId" , query = "SELECT c FROM CustomContentLayouts c WHERE c.customContentLayoutsId = :customContentLayoutsId" )
} )
public class CustomContentLayouts implements Serializable
{
    private static final long serialVersionUID = 1L;
    @Basic( optional = false )
    @Column( name = "form_media" )
    private String formMedia;
    @Column( name = "item_layout" )
    private String itemLayout;
    @Column( name = "designer_sfo" )
    private String designerSfo;
    @Column( name = "encapsulated_sfo" )
    private String encapsulatedSfo;
    @Lob
    @Column( name = "item_layout_jpeg" )
    private byte[] itemLayoutJpeg;
    @Column( name = "layout_in_sync" )
    private String layoutInSync;
    @Basic( optional = false )
    @Column( name = "created_by" )
    private String createdBy;
    @Basic( optional = false )
    @Column( name = "date_created" )
    @Temporal( TemporalType.TIMESTAMP )
    private Date dateCreated;
    @Column( name = "modified_by" )
    private String modifiedBy;
    @Column( name = "date_modified" )
    @Temporal( TemporalType.TIMESTAMP )
    private Date dateModified;
    @Id
    @Basic( optional = false )
    @Column( name = "custom_content_layouts_id" )
    private String customContentLayoutsId;
    @JoinColumn( name = "quest_id" , referencedColumnName = "quest_id" )
    @ManyToOne( optional = false )
    private QuestionTitle questId;


    public CustomContentLayouts()
    {
    }


    public CustomContentLayouts( String customContentLayoutsId )
    {
        this.customContentLayoutsId = customContentLayoutsId;
    }


    public CustomContentLayouts( String customContentLayoutsId , String formMedia , String createdBy , Date dateCreated )
    {
        this.customContentLayoutsId = customContentLayoutsId;
        this.formMedia = formMedia;
        this.createdBy = createdBy;
        this.dateCreated = dateCreated;
    }


    public String getFormMedia()
    {
        return formMedia;
    }


    public void setFormMedia( String formMedia )
    {
        this.formMedia = formMedia;
    }


    public String getItemLayout()
    {
        return itemLayout;
    }


    public void setItemLayout( String itemLayout )
    {
        this.itemLayout = itemLayout;
    }


    public String getDesignerSfo()
    {
        return designerSfo;
    }


    public void setDesignerSfo( String designerSfo )
    {
        this.designerSfo = designerSfo;
    }


    public String getEncapsulatedSfo()
    {
        return encapsulatedSfo;
    }


    public void setEncapsulatedSfo( String encapsulatedSfo )
    {
        this.encapsulatedSfo = encapsulatedSfo;
    }


    public byte[] getItemLayoutJpeg()
    {
        return itemLayoutJpeg;
    }


    public void setItemLayoutJpeg( byte[] itemLayoutJpeg )
    {
        this.itemLayoutJpeg = itemLayoutJpeg;
    }


    public String getLayoutInSync()
    {
        return layoutInSync;
    }


    public void setLayoutInSync( String layoutInSync )
    {
        this.layoutInSync = layoutInSync;
    }


    public String getCreatedBy()
    {
        return createdBy;
    }


    public void setCreatedBy( String createdBy )
    {
        this.createdBy = createdBy;
    }


    public Date getDateCreated()
    {
        return dateCreated;
    }


    public void setDateCreated( Date dateCreated )
    {
        this.dateCreated = dateCreated;
    }


    public String getModifiedBy()
    {
        return modifiedBy;
    }


    public void setModifiedBy( String modifiedBy )
    {
        this.modifiedBy = modifiedBy;
    }


    public Date getDateModified()
    {
        return dateModified;
    }


    public void setDateModified( Date dateModified )
    {
        this.dateModified = dateModified;
    }


    public String getCustomContentLayoutsId()
    {
        return customContentLayoutsId;
    }


    public void setCustomContentLayoutsId( String customContentLayoutsId )
    {
        this.customContentLayoutsId = customContentLayoutsId;
    }


    public QuestionTitle getQuestId()
    {
        return questId;
    }


    public void setQuestId( QuestionTitle questId )
    {
        this.questId = questId;
    }


    @Override
    public int hashCode()
    {
        int hash = 0;
        hash += ( customContentLayoutsId != null ? customContentLayoutsId.hashCode() : 0 );
        return hash;
    }


    @Override
    public boolean equals( Object object )
    {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if ( !( object instanceof CustomContentLayouts ) )
        {
            return false;
        }
        CustomContentLayouts other = (CustomContentLayouts) object;
        if ( ( this.customContentLayoutsId == null && other.customContentLayoutsId != null ) || ( this.customContentLayoutsId != null && !this.customContentLayoutsId.equals( other.customContentLayoutsId ) ) )
        {
            return false;
        }
        return true;
    }


    @Override
    public String toString()
    {
        return "idea.model.qnrlibrary.CustomContentLayouts[ customContentLayoutsId=" + customContentLayoutsId + " ]";
    }
    
}
